<!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8">
        
    </head>
    <body>

        <div >
            <p id="myDiv"></p>
        </div>
        <button type="button" onclick="loadXMLDoc()">修改内容</button>



        <script>
            
            function loadXMLDoc() {

                var xmlhttp = new XMLHttpRequest();
                
              

                xmlhttp.open("GET", "https://www.atu360.cn/api/phone/index", true);
                
                xmlhttp.send();
                
                xmlhttp.onreadystatechange = function () {
                    console.log(xmlhttp.readyState);
                    console.log(xmlhttp.status);
                    if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {

                       var data= JSON.parse(xmlhttp.responseText)

                        document
                            .getElementById("myDiv")
                            .innerHTML =data;
                            console.log(data);
                    }
                }
                
               
            }
        </script>
    </body>
</html>